package itdfq.dfq.Behavior_Patters.zhongjiezhe;

/**
 * @Author GocChin
 * @Date 2021/5/17 19:16
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Descript:
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("18031210111   段方钦");
        System.out.println("------------------------------");
        AbstractChatroom happyChat= (AbstractChatroom) XMLUtil.getBean();
        Student s1,s2,s3,s4,s5;
        s1=new PStudent(1,"张三");
        s2=new VIPStudent(2,"李四");
        s3=new SVIPStudent(3,"王五");
        s4=new VIPStudent(2,"小明");
        happyChat.register(s1);
        happyChat.register(s2);
        happyChat.register(s3);
        happyChat.register(s4);
        s1.receiveText("小明","李四你好");
        s2.receiveText("王五","王五你好");
        s1.sendImage("王五","一个小太阳");
        s2.sendImage("王五","小太阳");
        s2.sendImage("小明","一个超级超级大的太阳");
        s3.sendImage("王五","一个超级超级大的太阳");
    }
}
